const {MongoClient} = require("mongodb")

const url = 'mongodb://121.36.217.123:12021'
const client = new MongoClient(url)
const dbName = "user"
async function main(table){
    await client.connect()
    const db = client.db(dbName)
    const collection = db.collection(table)
    return collection
}
module.exports = main